﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ValidateStudentRegistration
{
    public partial class Register : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }
        
        protected void btnRegister_Click(object sender, EventArgs e)
        {
            Page.Validate();
            if (Page.IsValid)
            {
                ltMessage.Visible = true;
            }
        }

        protected void checkBoxAccept_CheckedChanged(object sender, EventArgs e)
        {
            btnRegister.Enabled = !btnRegister.Enabled;
        }

        protected void radioBtnMaleGender_CheckedChanged(object sender, EventArgs e)
        {
            lblChooseCoffee.Visible = false;
            dropDownListCoffee.Visible = false;

            lblChooseCars.Visible = true;
            checkBoxListCars.Visible = true;
        }

        protected void radioBtnFemaleGender_CheckedChanged(object sender, EventArgs e)
        {
            lblChooseCars.Visible = false;
            checkBoxListCars.Visible = false;

            lblChooseCoffee.Visible = true;
            dropDownListCoffee.Visible = true;
        }
    }
}